<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<body>
<style type="text/css">
	#tbCurriculumHome{
		padding: 15px;
		background: #fff;
		border-radius: 10px;
	}
	.aaa{
		width:50%;
		margin-left: 20%;
	}
	.layui-input-block{
		margin-left: 135px;
	}
	.layui-form-label{
		width: 100px;
	}
</style>
<div id="tbCurriculumHome">
	<fieldset class="layui-elem-field layui-field-title site-title">
		<legend><a name="fixbar">课程评价</a></legend>
	</fieldset>
	<form id="tbClassStateForm" method="post" class="layui-form white-bg radius">
		<input type = "hidden" name = "limit" value="${param.limit}">
		<input type = "hidden" name = "page" value="${param.page}">
		<input type="hidden" name="id" value="${model.id}">
		<div class="layui-form-item">
			<div class="layui-inline aaa">
				<label class="layui-form-label">课程名称</label>
				<div class="layui-input-block">
					<select name = "curriculum.id">
						<c:forEach items="${kc}" var = "c">
							<option value="${c.curriculum.id}" <c:if test='${model.curriculum.id == c.curriculum.id}'>selected</c:if>>${c.curriculum.courseName}</option>
						</c:forEach>
					</select>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline aaa">
				<label class="layui-form-label">评价等级</label>
				<div class="layui-input-block">
					<input type="hidden" class="layui-input" id="grade" name="grade" value="${model.grade}">
					<span id="grade1"></span>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline aaa">
				<label class="layui-form-label">课程点评</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="content" value="${model.content}">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline aaa">
				<label class="layui-form-label">建议</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="proposal" value="${model.proposal}">
				</div>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
form=layui.form;
form.render('select');
layui.use('rate', function(){
    var rate = layui.rate;
    var a = $("#grade").val().substring(0, 1);
    
    //渲染
    var ins1 = rate.render({
      	elem: '#grade1',  //绑定元素
      	//text: true,//开启文本
      	value: a,
      	choose: function(value){
	    	//alert(value+"星");				    		
	    	$("#grade").val(value+"星");
	  	}
    });
});
</script>
</body>
</html>